package com.siemens.exercise;

public class StringCalculator {
	Command add = new AddExecute ();
	Command subtract = new SubtractExecute();
	Command multiply = new MultiplyExecute();
	
	Execute calculator = new Execute (add, subtract, multiply);
	
	public int add(String string) throws NegtiveNumException {	
		return calculator.add(string);
	}
	
	public int subtract(String string) throws NegtiveNumException {
		return calculator.subtract(string);
	}
	
	public int multiply(String string) throws NegtiveNumException {
		return calculator.multiply(string);
	}
	
}
